﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ForumsBrowser.BusinessObjects;

namespace ForumsBrowser
{
    /// <summary>
    /// Interaction logic for UserTokenControl.xaml
    /// </summary>
    public partial class UserTokenControl : UserControl
    {
        public UserTokenControl()
        {
            InitializeComponent();
        }

        public static readonly DependencyProperty UserProperty =
            DependencyProperty.Register("User", typeof(User), typeof(UserTokenControl));

        public static readonly DependencyProperty DateValueProperty =
            DependencyProperty.Register("DateValue", typeof(DateTime), typeof(UserTokenControl));

        public User User
        {
            get { return (User)this.GetValue(UserProperty); }
            set 
            { 
                this.OnPropertyChanged(new DependencyPropertyChangedEventArgs(UserProperty, User, value));
                this.SetValue(UserProperty, value); 
            }
        }

        public DateTime DateValue
        {
            get { return (DateTime)this.GetValue(DateValueProperty); }
            set
            {
                this.OnPropertyChanged(new DependencyPropertyChangedEventArgs(DateValueProperty, DateValue, value));
                this.SetValue(DateValueProperty, value);
            }
        }
    }
}
